<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>面积</title>
    <script>
        window.onload=function(){
        alert("你确定登录本网页吗？");
        var ele_input=document.getElementsByTagName("input");
        ele_input[3].onclick = function(){
           var radius = ele_input[0].value;
          ele_input[1].value = 2*Math.PI*radius;
          ele_input[2].value = Math.PI*radius*radius;
        }
        ele_input[4].ondblclick = function(){
            ele_input[0].value = "";
            ele_input[1].value = "";
            ele_input[2].value = "";
        }
        }
    </script>
</head>
<body>
    <h1>求圆的周长和面积</h1>
    <form action="">
        半径：<input type="text" name="" id="" placeholder="请输入圆的半径值"><br>
        周长：<input type="text" name="" id=""><br>
        面积：<input type="text" name="" id=""><br>
        <input type="button" value="确定">
        <input type="button" value="重置">
    </form>
</body>
</html>